.if \n[NESTED] \{\
.so ../bk-macros
.TH "bk attach" "\*[BKVER]" %E% "\*(BC" "\*(UM"
.SH NAME
bk attach \- attach a component repository to a product repository
.SH SYNOPSIS
bk attach
.[B] \-qC
.[OPTequal] \-E e v
.[OPTreq] \-r rev
.ARG from
.[ARG] component
.SH DESCRIPTION
The 
.B bk attach
command is a form of
.BR "bk clone"
used to attach a component repository to a product repository
that is the portal.
The specified repository is cloned and becomes a component within
the product. This command must be run from within the product that
is the portal for this nested collection.
.SH OPTIONS
.TP \-E\*<env\*>=\*<val\*>
.tp
.B \-C
Do not commit the component to the product.
Use this option when you wish to combine the attach event with other
changes to the product.
.tp
.OPTequal \-E env val
Export an environment variable to the 
.B bkd
running in the remote \*(BK repository.
Typically used to pass information to remote triggers.
Only variables with the prefix
.V BKU_
are allowed.
.tp
.B \-q 
Run quietly.
.tp
.OPTreq \-r rev
Clone the repository up to and including cset 
.ARG rev .
A changeset number or changeset key can be used to specify
.ARG rev .
.SH SEE ALSO
.SA clone
.SA detach
.SA port
.SA portal
.SA setup
.SH CATEGORY
.B Nested
.\}
